use clap::Parser;

use crate::translate;

/// Simple program to greet a person
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {
    /// the path of assembly file
    assembly_file: String,
}

pub fn run() {
    let args = Args::parse();
    println!("- Assembly file: {}", args.assembly_file);
    match translate(&args.assembly_file) {
        Ok(output_file) => println!("- Output file: {}", output_file),
        Err(e) => eprintln!("Error: {}", e),
    }
}
